package com.hdoit.apollo.logical.shop.dao.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.hdoit.apollo.logical.shop.dao.ICustomerDao;
import com.hdoit.apollo.logical.shop.mapper.CustomerMapper;
import com.hdoit.apollo.logical.shop.model.Customer;
import com.hdoit.apollo.logical.viewmodel.shop.CustomerSearch;
import com.tennetcn.data.dao.base.impl.SuperDao;
/**
 * @author      tancongzhu
 * @email       
 * @createtime  2018年04月02日 17:47:28
 * @comment
 */
@Component
public class CustomerDaoImpl extends SuperDao<Customer> implements ICustomerDao{

	@Autowired
	private CustomerMapper customerMapper;
	@Override
	public List<Customer> getCustomerListByCargoId(String cargoId) {
		
		return customerMapper.getCustomerListByCargoId(cargoId);
	}
	@Override
	public Customer getCustomerByCustomerId(String customerId) {

		return customerMapper.getCustomerByCustomerId(customerId);
	}
	@Override
	public Customer queryCustomerInfoByCustomerId(String customerId) {
		
		return customerMapper.queryCustomerInfoByCustomerId(customerId);
	}
	@Override
	public Customer getCustomerById(String customerId, String shopId) {
		return customerMapper.getCustomerById(customerId,shopId);
	}
	@Override
	public Customer getRetailCustomer(String shopId) {
		return customerMapper.getRetailCustomer(shopId);
	}
	@Override
	public List<Customer> getList(CustomerSearch search) {
		return customerMapper.getList(search);
	}
	@Override
	public Customer queryModelByOpenId(String openId,String shopId) {
		
		return customerMapper.queryModelByOpenId(openId,shopId);
	}

}
